package com.demo.enums;

/**
 * 消息来源枚举
 * 0.His推送 1.评估 2.其他
 */
public enum MessageSourceEnum {
    HIS_PUSH(0, "His 推送"),
    PING_GU(1, "评估"),
    OTHER(2, "其他");

    private int value;
    private String desc;

    MessageSourceEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static MessageSourceEnum getByValue(Integer value) {
        for (MessageSourceEnum item : values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
